import request from "@/config/utils/request";
// import { loadingParams } from "@/basa/utils/public";
import { loadingParams, pageLoadingParams } from "@/basa/utils/public";

// 列表查询
export function getList(data) {
  return request({
    url: "/apis/smp/smppcconc/listSmpPcConcChangePage",
    method: "POST",
    data: { ...data, ...pageLoadingParams }
  });
}

// 协议框架的列表
export function listProtocolinfoPage(data) {
  return request({
    url: "/apis/smp/frameworkPlan/qrySupplyProtocolInfo",
    method: "POST",
    data
  });
}

// 采购计划的列表
export function listPurplanPage(data) {
  return request({
    url: "/apis/smp/frameworkPlan/listMatPurplanDetlPage",
    method: "POST",
    data
  });
}

// 采购方案的列表
export function listPursckinfoPage(data) {
  return request({
    url: "/apis/smp/frameworkPlan/listMatPursckinfoPage",
    method: "POST",
    data
  });
}

// 变更详情
export function getSmpPcConcChangeById(data) {
  return request({
    url: "/apis/smp/smppcconc/getSmpPcConcChangeById",
    method: "POST",
    data: { ...data, ...loadingParams }
  });
}

// 编辑详情
export function getSmpPcConcById(data) {
  return request({
    url: "/apis/smp/smppcconc/getSmpPcConcById",
    method: "POST",
    data: { ...data, ...loadingParams }
  });
}

// 新增--起草合同
export function saveSmpContractCreation(data) {
  return request({
    url: "/apis/smp/smppcconc/saveSmpPcConcChange",
    method: "POST",
    data: { ...data, ...loadingParams }
  });
}

// 编辑--起草合同
export function editSmpContractCreation(data) {
  return request({
    url: "/apis/smp/smppcconc/editSmpPcConcChange",
    method: "POST",
    data: { ...data, ...loadingParams }
  });
}

// 撤回--起草合同
export function revokeSmpPcConcChange(data) {
  return request({
    url: "/apis/smp/smppcconc/revokeSmpPcConcChange",
    method: "POST",
    data: { ...data, ...loadingParams, loadingMessage: "撤回中,请稍等..." }
  });
}

// 删除-物资变更
export function removeSmpPcConcChange(data) {
  return request({
    url: "/apis/smp/smppcconc/removeSmpPcConcChange",
    method: "POST",
    data: { ...data, ...loadingParams, loadingMessage: "删除中,请稍等..." }
  });
}

// 供应链管理 - 物资 - 合同变更导出
export function changeExport(data) {
  return request({
    url: "/apis/smp/smppcconc/changeExport",
    method: "POST",
    data: { ...data, ...loadingParams, loadingMessage: "导出中,请稍等..." }
  });
}
